<?
require_once("../config/dbconn.php");require_once("../config/usercls.php");require_once("pwd1cls.php");

$sqlgs="select * from {$db_prefix}users where ifnull(tjuser,0)=0 and ifnull(gluser,0)=0";
$rsgs=$db->get_one($sqlgs);
$gsid=$rsgs['id'];
$sql="select * from {$db_prefix}users where id='".$_SESSION['sys_userid']."'";
$rs=$db->get_one($sql);
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	 background-image: url(image1/bg-body.png);
}
-->
</style>

<link href="images/skin.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="17" height="29" valign="top" background="images/mail_leftbg1.png"><img src="images/left-top-right1.png" width="17" height="29" /></td>
    <td width="100%" height="29" valign="top" background="images/content-bg1.png"><table width="100%" height="31" border="0" cellpadding="0" cellspacing="0" class="left_topbg" id="table2">
      <tr>
        <td height="31"><div class="titlebt">&nbsp;&nbsp;资料查看</div></td>
      </tr>
    </table></td>
    <td width="16" valign="top" background="images/mail_rightbg.png"><img src="images/nav-right-bg.png" width="16" height="29" /></td>
  </tr>
  <tr>
    <td height="71" valign="middle" background="images/mail_leftbg1.png">&nbsp;</td>
    <td valign="top"><table width="100%" height="138" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td height="13" valign="top">&nbsp;</td>
      </tr>
      <tr>
        <td valign="top">
		
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td colspan="3"><table width="100%" height="31" border="0" cellpadding="0" cellspacing="0" class="nowtable">
                <tr>
                  <td class="left_bt2">&nbsp;&nbsp;&nbsp;&nbsp;</td>
                </tr>
              </table></td>
            </tr>
            <tr>
              <td height="30" colspan="3">
			  
			  <table width="100%" height="840" border="0" cellpadding="0" cellspacing="0">
			   <tr style="display:none">
                  <td align="center" bgcolor="#f2f2f2" class="left_txt">形象头像</td>
                  <td height="30" bgcolor="#f2f2f2" class="left_txt"><? if ($rs['headimg']){
				  ?>
				  <img src="../jquery_php_crop/upload_pic/<?=$rs['headimg']?>">
				  <?
				  }?>  <a href="../jquery_php_crop">设置形象头像</a></td>
                </tr>
                <tr>
                  <td align="center" bgcolor="#f2f2f2" class="left_txt">用户名</td>
                  <td height="30" bgcolor="#f2f2f2" class="left_txt"><? echo $rs['username']?></td>
                </tr>
                <tr>
                  <td align="center" class="left_txt" bgcolor="#f2f2f2">姓名</td>
                  <td height="30" class="left_txt" bgcolor="#f2f2f2">
                    <?=$rs['nickname']?>                 </td>
                </tr>
				   <tr>
				     <td align="center" bgcolor="#f2f2f2" class="left_txt">性别</td>
				     <td height="30" bgcolor="#f2f2f2" class="left_txt"><?=$rs['sex']?></td>
			        </tr>
				   <tr style="display:none">
				     <td align="center" bgcolor="#f2f2f2" class="left_txt">注册级别</td>
				     <td height="30" bgcolor="#f2f2f2" class="left_txt"><?=$hyrankary[$rs['rank']]?></td>
			        </tr>
				   <tr style="display:none">
				     <td align="center" bgcolor="#f2f2f2" class="left_txt">注册类型</td>
				     <td height="30" bgcolor="#f2f2f2" class="left_txt"><? if ($rs['iskong']==1) echo "空点";else echo "实点";?></td>
			        </tr>
				   <tr style="display:none">
				     <td align="center" bgcolor="#f2f2f2" class="left_txt">报单金额</td>
				     <td height="30" bgcolor="#f2f2f2" class="left_txt"><?=$rs['regmoney']?></td>
			        </tr>
				   <tr style="display:none">
				     <td align="center" bgcolor="#f2f2f2" class="left_txt">报单级别</td>
				     <td height="30" bgcolor="#f2f2f2" class="left_txt"><?=$hyrankary[$rs['rankreg']]?></td>
			        </tr>
				   <tr style="display:none">
				     <td align="center" bgcolor="#f2f2f2" class="left_txt">报单业绩</td>
				     <td height="30" bgcolor="#f2f2f2" class="left_txt"><?=$rs['regpv']?></td>
			        </tr>
					<?
					if ($gsid!=$_SESSION['sys_userid']){
					?>
				   <tr>
				     <td align="center" bgcolor="#f2f2f2" class="left_txt">推荐会员</td>
				     <td height="30" bgcolor="#f2f2f2" class="left_txt"><? echo $rs['tjuser'];?></td>
			        </tr>
				   <tr>
				     <td align="center" bgcolor="#f2f2f2" class="left_txt">接点会员</td>
				     <td height="30" bgcolor="#f2f2f2" class="left_txt"><? echo $rs['gluser'];?></td>
			        </tr>
				   <tr>
				     <td align="center" bgcolor="#f2f2f2" class="left_txt">位置</td>
				     <td height="30" bgcolor="#f2f2f2" class="left_txt"><?=$sysposary[$rs['pos']]?></td>
			        </tr>
				   <tr style="display:">
				     <td align="center" bgcolor="#f2f2f2" class="left_txt">所属服务中心</td>
				     <td height="30" bgcolor="#f2f2f2" class="left_txt"><? echo $rs['bduser'];?></td>
			        </tr>
					<?
					}
					?>
				    <tr>
				      <td align="center" bgcolor="#f2f2f2" class="left_txt">身份证</td>
				      <td height="30" bgcolor="#f2f2f2" class="left_txt"><?=$rs['idcard']?></td>
			        </tr>
				    <tr>
				     <td align="center" bgcolor="#f2f2f2" class="left_txt">QQ</td>
				     <td height="30" bgcolor="#f2f2f2" class="left_txt"><?=$rs['qq']?></td>
			        </tr>
				   <tr>
				     <td align="center" bgcolor="#f2f2f2" class="left_txt">E-mail</td>
				     <td height="30" bgcolor="#f2f2f2" class="left_txt"><?=$rs['email']?></td>
			        </tr>
				   <tr>
				     <td align="center" bgcolor="#f2f2f2" class="left_txt">手机</td>
				     <td height="30" bgcolor="#f2f2f2" class="left_txt"><?=$rs['mobile']?></td>
			        </tr>
				   <tr style="display:">
				     <td align="center" bgcolor="#f2f2f2" class="left_txt">收货地址</td>
				     <td height="30" bgcolor="#f2f2f2" class="left_txt"><?=$rs['address']?></td>
			        </tr>
				   <tr style="display:">
				     <td align="center" bgcolor="#f2f2f2" class="left_txt">所在地区</td>
				     <td height="30" bgcolor="#f2f2f2" class="left_txt"><? echo getprovince($rs['province'])."-".getcity($rs['city'])."-".getarea($rs['area'])?></td>
			        </tr>
				   <tr>
				     <td align="center" bgcolor="#f2f2f2" class="left_txt">开户银行</td>
				     <td height="30" bgcolor="#f2f2f2" class="left_txt"><?=$rs['bank']?></td>
			        </tr>
				   <tr>
				     <td align="center" bgcolor="#f2f2f2" class="left_txt">银行地址</td>
				     <td height="30" bgcolor="#f2f2f2" class="left_txt"><?=$rs['bankaddress']?></td>
			        </tr>
				   <tr>
				     <td align="center" bgcolor="#f2f2f2" class="left_txt">银行卡号</td>
				     <td height="30" bgcolor="#f2f2f2" class="left_txt"><?=$rs['bankno']?></td>
			        </tr>
				   <tr>
				     <td align="center" bgcolor="#f2f2f2" class="left_txt">卡号开户名</td>
				     <td height="30" bgcolor="#f2f2f2" class="left_txt"><?=$rs['bankname']?></td>
			        </tr>
                   
				   <tr>
				     <td align="center" bgcolor="#f2f2f2" class="left_txt">注册时间</td>
				     <td height="30" bgcolor="#f2f2f2" class="left_txt"><?=date("Y-m-d H:i:s",$rs['regtime'])?></td>
			        </tr>
				   <tr>
				     <td align="center" bgcolor="#f2f2f2" class="left_txt">&nbsp;</td>
				     <td height="30" bgcolor="#f2f2f2" class="left_txt">&nbsp;</td>
			        </tr>
              </table></td>
            </tr>
            
            <tr></tr>
            <tr>
              <td width="50%" height="30" align="right"><a href="user_edit.php">修改资料</a></td>
              <td width="6%" height="30" align="right">&nbsp;</td>
              <td width="44%" height="30">&nbsp;</td>
            </tr>
            <tr>
              <td height="30" colspan="3">&nbsp;</td>
            </tr>
          </table>
		 
		  </td>
      </tr>
    </table></td>
    <td background="images/mail_rightbg.png">&nbsp;</td>
  </tr>
  <tr>
    <td valign="middle" background="images/mail_leftbg1.png"><img src="images/buttom_left2.png" width="17" height="17" /></td>
      <td height="17" valign="top" background="images/buttom_bgs.png"><img src="images/buttom_bgs.png" width="17" height="17" /></td>
    <td background="images/mail_rightbg.png"><img src="images/buttom_right2.png" width="16" height="26" /></td>
  </tr>
</table>

</body>
</html>
